-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHP 8.4] PCRE - PCRE2-v10.44 updates #4078
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, one remark.
Prior to PHP 8.4.0, an opening curly bracket that | ||
appears in a position where a quantifier is not allowed, or | ||
one that does not match the syntax of a quantifier, is taken | ||
as a literal character. For example, {,6} is not a quantifier, | ||
but a literal string of four characters. | ||
as a literal character. For example, <literal>{,6}</literal> | ||
is not a quantifier, but a literal string of four characters. | ||
|
||
As of PHP 8.4.0, the PCRE extension is bundled with PCRE2 version 10.44, | ||
which allows patterns such as <literal>\d{,8}</literal> and they are | ||
interpreted as <literal>\d{0,8}</literal>. | ||
|
||
Further, as of PHP 8.4.0, space characters around quantifiers such as | ||
<literal>\d{0 , 8}</literal> and <literal>\d{ 0 , 8 }</literal> are allowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly those should be 3 different <simpara>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, it makes sense that we split them.
<simpara> |
<para> |
---|---|
I tried with three <simpara>
tags, and a separate <para>
, I liked the second one because it puts all PHP 8.4 stuff together, and looks more compact. What do you think? I pushed with the <para>
tag now, but if you think <simpara>
makes more sense, I can quickly change to that too 🙏.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<simpara>
is better than a <para>
tag, it is just the grouping that matters here.
/r
modifier.More changes noted here and here.
Unicode script list here was not updated for quite a while. As of PHP 8.4.0, there are close to 230 scripts and 160 shorthand script names. The table would need a bigger update, and not part of the PR, but will be added in a future PR.